from device.models import Device, MaintenanceRecord
from dvadmin.utils.serializers import CustomModelSerializer

class DeviceSerializer(CustomModelSerializer):
    """设备管理序列化器"""
    class Meta:
        model = Device
        fields = "__all__"

class DeviceCreateUpdateSerializer(CustomModelSerializer):
    """设备管理创建/更新序列化器"""
    class Meta:
        model = Device
        fields = '__all__'

class MaintenanceRecordSerializer(CustomModelSerializer):
    """维护记录序列化器"""
    class Meta:
        model = MaintenanceRecord
        fields = "__all__"

class MaintenanceRecordCreateUpdateSerializer(CustomModelSerializer):
    """维护记录创建/更新序列化器"""
    class Meta:
        model = MaintenanceRecord
        fields = '__all__'